package com.example.springstatemachine.action;

import com.example.springstatemachine.consant.DocumentEvents;
import com.example.springstatemachine.consant.DocumentStates;
import org.springframework.statemachine.StateContext;
import org.springframework.statemachine.action.Action;
import org.springframework.stereotype.Component;

@Component
public class SubmitAction implements Action<DocumentStates, DocumentEvents> {

    @Override
    public void execute(StateContext<DocumentStates, DocumentEvents> context) {
        System.out.println("Executing action for event: " + context.getEvent());
        // 在这里可以添加更多的业务逻辑，例如记录日志
    }
}